package cn.itsource.ymcc.constant;

import lombok.Data;

public enum ErrorConstantCode {

    // 全局统一 100XX
    PARAMETER_NOT_BE_NULL ("参数异常","10001"),
    TELEPHONE_FORMAT_EXCEPTION_10002 ("电话号码不正确","10002"),

    // 管理服务 200XX

    // 课程的 300XX
    COURSE_ERROR_30010("课程不存在异常","30010"),
    COURSE_ONLINE_ERROR_30020("课程上架失败","30020"),
    COURSE_ONLINE_ERROR_30030("课程已经上架","30030"),
    COURSE_TYPE_ID_NULL_30040("课程分类id不能为空！","30040"),
    COURSE_TYPE_NULL_30050("课程分类不存在！","30050"),
    COURSE_NOT_ONLINE_30060("课程未上线！","30060"),
    COURSE_NOT_MEIDA_30070("课程视频不存在！","30070"),
    COURSE_NOT_BUY_30080("课程未购买，请先购买在播放！","30080"),
    COURSE_DUP_30090("课程以过期，请重新购买，在播放！","30090"),

    // common 服务 400xx
    //"手机号不可为空","40010"
    PHONE_NOT_EMPTY_40010("手机号不可为空","40010"),
    PHONE_FORMATE_40020("手机格式不正确","40020"),
    REPEAT_SEND_40030("提示用户请勿重复发送","40030"),

    // user 服务 500XX
    VEROIFYCODE_NOT_EQUALS("验证码不一致","50010"),
    VEROIFYCODE_IS_NULL("验证码为空","50020"),
    PHONE_HAS_REGISTERED("手机号已注册","50030"),

    // order 服务600XX
    TOKEN_ERROR_60010("tonken校验失败","60010"),

    // kill 700XX
    REPEAT_SECKILL_60010("重复秒杀","70010");

    private final String message;
    private final String code;

    ErrorConstantCode(String message, String code) {
        this.message = message;
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }
}
